package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.CrmMemberRelationAddDTO;
import org.jsola.hr.dto.CrmMemberRelationUpdateDTO;
import org.jsola.hr.query.CrmMemberRelationQuery;
import org.jsola.hr.vo.CrmMemberRelationListVO;
import org.jsola.hr.vo.CrmMemberRelationVO;

import java.util.List;

/**
 * 成员关系表
 *
 * @author zhr
 */
@Api(tags = "hr-成员关系表")
public interface ICrmMemberRelationControllerAPI {

    /**
     * 新增成员关系表
     * @param crmMemberRelationAddDTO 成员关系表新增实体
     * @return 成员关系表展示对象
     */
    @ApiOperation(value = "新增成员关系表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmMemberRelationAddDTO", dataType = "CrmMemberRelationAddDTO", value = "新增成员关系表", paramType = "body")
    })
    Result<CrmMemberRelationVO> save(CrmMemberRelationAddDTO crmMemberRelationAddDTO);


    /**
     * 修改成员关系表
     * @param crmMemberRelationUpdateDTO 成员关系表
     * @return 更新数量
     */
    @ApiOperation(value = "修改成员关系表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmMemberRelationUpdateDTO", dataType = "CrmMemberRelationUpdateDTO", value = "修改成员关系表", paramType = "body")
    })
    Result<Integer> update(CrmMemberRelationUpdateDTO crmMemberRelationUpdateDTO);




    /**
     * 删除单个成员关系表，彻底删除
     * @param crmMemberRelationId 成员关系表id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个成员关系表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmMemberRelationId", dataType = "String", value = "成员关系表id", paramType = "path")
    })
    Result<Integer> delete(String crmMemberRelationId);


    /**
     * 批量删除成员关系表，彻底删除
     * @param crmMemberRelationIds 成员关系表id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除成员关系表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmMemberRelationIds", dataType = "String[]", value = "成员关系表id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] crmMemberRelationIds);


    /**
     * 根据成员关系表id查询成员关系表详情
     * @param crmMemberRelationId 成员关系表id
     * @return 成员关系表详情
     */
    @ApiOperation(value="根据成员关系表id查询成员关系表详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmMemberRelationId", dataType = "String", value = "成员关系表id", paramType = "path")
    })
    Result<CrmMemberRelationVO> findById(String crmMemberRelationId);


    /**
     * 查询成员关系表
     * @param crmMemberRelationQuery 成员关系表查询参数
     * @return page
     */
    @ApiOperation(value="查询成员关系表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmMemberRelationQuery", dataType = "CrmMemberRelationQuery", value = "成员关系表查询参数", paramType = "query")
    })
    Result<List<CrmMemberRelationListVO>> listAll(CrmMemberRelationQuery crmMemberRelationQuery);


     /**
     * 分页查询成员关系表
     * @param crmMemberRelationQuery 成员关系表查询参数
     * @return page
     */
    @ApiOperation(value="分页查询成员关系表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmMemberRelationQuery", dataType = "CrmMemberRelationQuery", value = "成员关系表查询参数", paramType = "query")
    })
    Result<Page<CrmMemberRelationListVO>> page(CrmMemberRelationQuery crmMemberRelationQuery);


}

